/**
 * @param {string} instructions
 * @return {boolean}
 */
 var isRobotBounded = function(instructions) {
  let set = new Set(),row=0,col=0,direction=[[0,1],[-1,0],[0,-1],[1,0]]
  set.add(''+row+col)
  for(let i=0;i<instructions.length;i++){
    

    if(set.has(''+row+col)){
      return true
    }
  }

  return false;
};

isRobotBounded('GGLLRR')